#ifndef GDN_INPUTMANAGER_H
#define GDN_INPUTMANAGER_H

#include "gdn/Key.h"
#include "gdn/MouseButton.h"
#include "gdn/Vector2.h"

namespace gdn
{
	class InputManager
	{
		public:
			bool IsKeyDown( Key::Code key ) const;
			inline bool IsKeyUp( Key::Code key ) const;

			bool IsMouseButtonDown( Mouse::Button button ) const;
			inline bool IsMouseButtonUp( Mouse::Button button ) const;

			Vector2f GetMousePosition() const;

		protected:
			friend class Window;

			bool keys[ Key::Count ];
			bool mouseButtons[ Mouse::ButtonCount ];
			Vector2f mousePos;
	};

	bool InputManager::IsKeyUp( Key::Code key ) const
	{
		return !IsKeyDown( key );
	}

	bool InputManager::IsMouseButtonUp( Mouse::Button button ) const
	{
		return !IsMouseButtonDown( button );
	}
}

#endif // GDN_INPUTMANAGER_H
